package com.uw.uwconfig.server.config;


import com.uw.uwconfig.server.cluster.Cluster;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.context.annotation.Bean;

import javax.sql.DataSource;

@SpringBootConfiguration
public class UwConfigConfig {


    @Bean(initMethod = "start", destroyMethod = "stop")
    public Cluster cluster(@Autowired DataSource dataSource) {
        return new Cluster(dataSource);
    }

}
